﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ListVideo.ascx.cs" Inherits="GUI.Controls.Video.ListVideo" %>
<div class="video-list-container clearfix" id="zone-list" name="zone-list">
    <div class="video-list-header clearfix">
        <h1>
            <a id="video-tab-newest" href="javascript:void(0);">VIDEO MỚI NHẤT</a> <a id="video-tab-mostview" href="javascript:void(0);">VIDEO XEM NHIỀU NHẤT</a>
        </h1>
    </div>
    <div class="video-list-content clearfix" id="video-list-content">
        <asp:Literal runat="server" ID="ltrData"></asp:Literal>
    </div>
    <div class="video-paging clearfix" id="video-paging">
    </div>
</div>
<script type="text/javascript">

    (function () {
        $("#video-tab-newest").click(function (e) {
            var videoZoneId = 0;
            var relZoneId = $(".video-menu li.active").attr("rel");
            if (relZoneId && relZoneId != '') {
                videoZoneId = parseInt(relZoneId);
            }
            var pagingUrl = $(".video-menu li.active").attr("pagingUrl");
            e.preventDefault();
            var handler = $(this);

            sohavideo.loadNewVideo(videoZoneId, 1, 16, pagingUrl, function () {
                $(".video-list-header h1 a.current").removeClass("current");
                handler.addClass("current");
            });
        });

        $("#video-tab-mostview").click(function (e) {
            e.preventDefault();

            var videoZoneId = 0;
            var relZoneId = $(".video-menu li.active").attr("rel");
            if (relZoneId && relZoneId != '') {
                videoZoneId = parseInt(relZoneId);
            }
            var pagingUrl = $(".video-menu li.active").attr("pagingUrl");

            var handler = $(this);
            sohavideo.loadMostViewVideo(videoZoneId, 1, 16, pagingUrl, function () {
                $(".video-list-header h1 a.current").removeClass("current");
                handler.addClass("current");
            });
        });

        $("#video-tab-newest").click();
    })();    

</script>
